//
//  ApeNavigationController.h
//  ApeFoundation
//
//  Created by Eton on 2016/10/25.
//  Copyright © 2016年 ApeStar. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ApeNavigationController : UINavigationController<UIGestureRecognizerDelegate>

@property (nonatomic, strong, readonly) UIViewController *rootViewController;

@property (nonatomic, assign) BOOL supportPopGestureEnabled;//默认：YES

@end

/**
 Nav栏工具
 */
@interface UINavigationController (ApeVCManagerUtil)

/**
 * 返回上个页面
 * 如果是在子栈 User: popViewControllerAnimated:
 * 否则 User: dismissViewControllerAnimated:completion:
 */
- (void)back;

/**
 * 用Class进行Init后Push到对应的Controller
 */
- (id)pushViewControllerClass:(Class)controllerClass;

/**
 * 用Pop到Class对应的Controller
 */
- (id)popToViewControllerClass:(Class)controllerClass;

/**
 * 移除viewControllers中的Controller
 */
- (BOOL)removeViewController:(UIViewController *)controller;

/**
 * 移除viewControllers中Class所有的Controller
 */
- (BOOL)removeViewControllerClass:(Class)controllerClass;

@end
